#include<stdio.h>
float atfo(char* b)
{
    float result = (float)0.0;
    float decimal = (float)0.0;
    int flag = 1;
    float count = (float)0.1;
    while (*b != '.')
    {
        if (*b == '-')
        {
            flag = -1;
        }
        result = result * 10 + *b - '0';
        b++;
    }
    if (*b == '.') {
        b = b + 1;
        while (*(b) != '\0')
        {
            decimal = decimal * 10 + *b - '0';
            count = count * (float)0.1;
            b++;
        }
    }
    result = (result + (decimal * count * 10)) * flag;
    return result;
}
int main()
{
    char* b = "3.14";
    float c = atfo(b);
    printf("%.2f\n", c);
    return 0;
}